package io.gitee.zhangbinhub.admin.po

import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty
import org.noear.solon.validation.annotation.Max
import org.noear.solon.validation.annotation.Min
import org.noear.solon.validation.annotation.NotBlank

@ApiModel("菜单配置参数")
data class MenuPo(
    @ApiModelProperty(name = "菜单ID")
    var id: String? = null,
    @ApiModelProperty(name = "应用ID", required = true)
    @field:NotBlank(message = "应用ID不能为空")
    var appId: String? = null,
    @ApiModelProperty(name = "菜单名称", required = true)
    @field:NotBlank(message = "菜单名称不能为空")
    var name: String? = null,
    @ApiModelProperty(name = "菜单图标", required = true)
    @field:NotBlank(message = "菜单图标不能为空")
    var iconType: String? = null,
    @ApiModelProperty(name = "链接路径", required = true)
    var path: String? = null,
    @ApiModelProperty(name = "上级菜单ID", required = true)
    @field:NotBlank(message = "上级菜单ID不能为空")
    var parentId: String? = null,
    @ApiModelProperty(name = "菜单是否启用", required = true)
    var enabled: Boolean = true,
    @ApiModelProperty(name = "链接打开模式；0-内嵌，1-新标签页", required = true)
    @field:Min(value = 0, message = "打开模式只能为 0 或 1")
    @field:Max(value = 1, message = "打开模式只能为 0 或 1")
    var openType: Int = 0,
    @ApiModelProperty(name = "序号", required = true)
    var sort: Int = 0,
    @ApiModelProperty(name = "关联角色ID")
    var roleIds: MutableList<String> = mutableListOf()
)